﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="ThanhCongJSC.Helper"%>
<%@ Import Namespace="ThanhCongJSC.Models"%>

<% List<ThanhCongJSC.Models.Content> top3Content = new List<ThanhCongJSC.Models.Content>();
   using (DBThangCongJSCEntities entity = new DBThangCongJSCEntities())
   {
       ContentRepository contentRepository = new ContentRepository(entity);
       var model = contentRepository.GetTop10News(0, Session["CultureInfo"].ToString());
       top3Content = model.Take(3).ToList<ThanhCongJSC.Models.Content>();
   } %>
   
<%foreach(var item in top3Content){ %>
   <div class="ztlistitem">
        <a class="ztlisttitle" title="" href='<%= Url.Action("Index", new { queryString = item.ContentCode }) %>'>
            <img src="<%= Url.Content(Constant.PathImageTinTuc + item.ContentImage ?? string.Empty) %>" 
            alt="" width="120px" height="80px" class="caption" border="0"/>
        </a>
	    <a class="ztlisttitle" title="" href='<%= Url.Action("Index", new { queryString = item.ContentCode }) %>'>
            <%= item.ContentTitle%>
        </a>
	    <p class="ztlistdes"><%= item.ContentTitle%></p>
   </div> 
<%} %>